package com.Config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.*;


@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
          registry.addInterceptor(new LoginIterceptor())
                .addPathPatterns(
                        "/**"
                )
                .excludePathPatterns(
                        "/front/login",
                        "/front/register",
                        "/css/**", "/js/**", "/images/**", "/static/**"
                );
    }
}
